package com.gxa.web_admin.controller.drivingManagement;

import com.gxa.common.base.RespResult;
import com.gxa.modules.entity.TeachArea;
import com.gxa.modules.service.drivingManagementService.DrivingManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/drivingManagement")
//@RequiresPermissions(value = {"system:drivingManagement"})
public class DrivingManagementController {//驾校信息设置

    @Autowired
    private DrivingManagementService drivingManagementService;

    @PostMapping("/uploadLOGO")//上传驾校LOGO
    public RespResult uploadLOGO(){

        return null;
    }

    @PostMapping("/uploadPubPicture")//上传宣传图片
    public  RespResult uploadPubPicture(){

        return null;
    }

    @GetMapping("/showDrivingIntroduce")//显示驾校简介
    public  RespResult showDrivingIntroduce(){

        return drivingManagementService.showDrivingIntroduce();
    }

    @PostMapping("/updateDrivingIntroduce")//更新驾校简介
    public  RespResult updateDrivingIntroduce(String brief){

        return drivingManagementService.updateDrivingIntroduce(brief);
    }

    @PostMapping("/addTeachArea")//添加教学区域
    public RespResult addTeachArea(TeachArea teachArea){

        return drivingManagementService.addTeachArea(teachArea);
    }

    @GetMapping("/queryAllTeachArea")//查询全部教学区域
    public RespResult queryAllTeachArea(int page,int limit){

        return drivingManagementService.queryAllTeachArea(page,limit);
    }

    @GetMapping("/queryTeachAreaByTrainIdOrTeachAreaId")//根据培训机构编号和教学区域编号查询
    public RespResult queryTeachAreaByTrainIdOrTeachAreaId(Integer trainId,Integer teachAreaId){

        return drivingManagementService.queryTeachAreaByTrainIdOrTeachAreaId(trainId,teachAreaId);
    }

    @PostMapping("/updateTeachArea")
    public RespResult updateTeachArea(TeachArea teachArea){//更新教学区域

        return drivingManagementService.updateTeachArea(teachArea);
    }







}
